//
//  UIButton+aRLayer.m
//  DuoBaoKnigh
//
//  Created by aReu on 16/9/5.
//  Copyright © 2016年 aReu. All rights reserved.
//

#import "UIView+aRLayer.h"
#import "CALayer+Color.h"

@implementation UIView(aRLayer)

-(void)btnCorner:(CGFloat)radio :(CGFloat)borWith :(UIColor*)borColor{
    if (0 == radio) {
        self.layer.cornerRadius = self.height/2;
    }else{
        self.layer.cornerRadius = radio;
    }
    if (borWith != 0) {
        self.layer.borderWidth = borWith;
    }
    if (borColor) {
        self.layer.borderColor = borColor.CGColor;
    }
    self.layer.masksToBounds   = YES;
}

@end
